Prob with yum: [Errno -1] Metadata file does not match checksum
Trying other mirro
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have found that sometimes the upstream mirror has a corrupt metadata file, possibly caused by running buildrepo while files were still being updated or something like that. The only solution then seems to be to wait 4-24 hours and try again.
Another solution, and one I've since done, is to build your own repository. You just need a web server with ~5 GB free space per version+architecture combination you use, an upstream repo to mirror from (I asked and got permission from GA Tech) and a couple of shell scripts (there are links on centos.org you can read more about this). Then you just modify the /etc/yum.repos.d/CentOS-Base.repo file on each of your servers to point to your repo instead of using the default mirror list for the Base, Updates, Extras and Addons repos, and you're in charge of your own fate.
Updates and kickstarts go a LOT faster when you have your own repository. And if your bosses agree (mine didn't), you can give back to the community by making your repo available over the Internet to other users.
I know this thread is a bit old, but I just ran across it as I was searching for an answer and wanted to add to the collective knowledge of what worked for me.
It appears that this issue is likely to be caused by http caching on the server (repo) side. The reason that "yum clean all" won't fix the problem immediately is because yum will just download the cached out of date metadata file again. Until the repo http server's cache times out and caches the new metadata file, you'll keep getting the old metadata file and yum will keep complaining.
You can instruct yum not to use http caching, however. To do so globally, just add this option under the [main] section in /etc/yum.conf:
Code:
http_caching=none
Now run yum clean all and yum check-update and you should be good to go!
I haven't tested it, but I would assume that you could also specify this option at a repo level instead of globally if you prefer.
I tried all the previous options, including
-> vi /etc/yum/pluginconf.d/fastestmirror.conf & set enabled=0
-> yum clean all
-> rpm --rebuilddb
even the one with adverse side effects
-> yum -y remove yum-fastestmirror
The above command removed yum. I used the CD I used to install the OS, and the following commands to get it back
-> cd /media/CDROM/CentOS
-> rpm -Uvh yum-3.2.19*.rpm yum-fastestmirror-*.rpm
Finally, what worked was as you mention in your post.
-> vi /etc/yum.conf (add the line http_caching=none under section [main])
-> yum clean all
Last edited by illinux; 04-03-2012 at 07:56 AM.
Reason: removed all the unwanted "QUOTE" entries
I stumbled upon this thread while searching for "yum metadata file does not match checksum" online.
I would like to add some useful recon to this thread:
Root cause of problem:
I had a Scientific Linux 5.3 test server that I backed up to a local tar file, upgraded to 5.7 and then restored the backup to take it back down to 5.3 (testing rollback prior to patching production servers).
After rolling back to 5.3, I then reinitiated an upgrade and ran into this problem. yum returned the "metadata file does not match checksum" error.
Solution:
Code:
yum clean metadata
Following that, I was able to proceed with a full upgrade to 5.7 as normal.
Thank you, LinuxQuestions.org and its community, yet again, for hosting good information and showing up with high relevance in search results.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.